//引入angular及ionic的系统模块
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';

//引入components模块
import { ComponentsModule } from '../components/components.module';

//引入根组件
import { MyApp } from './app.component';

//自定义组件
import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

import { NewsPage } from '../pages/news/news';
import { NewsOnePage } from '../pages/news-one/news-one';
import { NewsinfoPage } from '../pages/newsinfo/newsinfo';

//引入服务
import {LookService} from '../services/look-service';
import {HttpModule} from '@angular/http';

//ionic打包成app以后配置启动画面以及导航条的服务 （不用管）
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

@NgModule({
  declarations: [/*申明组件*/
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    NewsPage,
    NewsOnePage,
    NewsinfoPage
  ],
  imports: [/*引入的模块 依赖的模块*/
    BrowserModule,
    ComponentsModule,
    HttpModule,
    // IonicModule.forRoot(MyApp),
    IonicModule.forRoot(MyApp,{
      tabsHideOnSubPages: 'true', //隐藏全部子页面 tabs
      backButtonText: '返回'      //配置返回按钮
    }),
  ],
  bootstrap: [IonicApp],/*启动的模块*/
  entryComponents: [/*配置不会在模板中使用的组件*/
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    NewsPage,
    NewsOnePage,
    NewsinfoPage
  ],
  providers: [/*配置服务*/
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    LookService
  ]
})
export class AppModule {}
